# -*- coding:utf-8 -*-
# @Time:2023/9/17 15:25
# @Author: cevent
# @name=  加载celery，消费者即是celery服务器

from celery import Celery

# 1.创建celery实例-生产者(param名称)
celeryApp = Celery('yiDaoCelery')

# 2.加载配置
celeryApp.config_from_object('celery_task.config')

# 3.注册任务,tasks为负数，那么为列表形式传参，找到tasks.py的任务
celeryApp.autodiscover_tasks(['celery_task.sms'])
